from likeshop.base.mybase import Tools


# 添加购物车
class add_cart_model(Tools):
    # 定义登录路径
    path = "/page/cart/add"

    # 发送登录请求
    def add_cart_action(self, spgg, sl, db):
        mydata = {
            'item_id': spgg,
            'goods_num': sl
        }
        res = self.session.post(url=self.hosturl+self.path, data=mydata, headers=db)
        return res.json()


